package com.csap.framework.oauth2.request;

import com.csap.framework.annotation.apidoc.ApiModel;
import com.csap.framework.annotation.apidoc.ApiModelProperty;
import com.csap.framework.oauth2.BaseRequest;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * 密码式授权
 *
 * @author yangchengfu
 * @dataTime 2021年-08月-03日 10:38:00
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@ApiModel("密码式授权")
public class PasswordRequest extends BaseRequest<PasswordRequest> {
    @ApiModelProperty(value = "用户名", forceReq = true, required = true)
    @NotEmpty(message = "用户名不能为空")
    private String userName;
    @ApiModelProperty(value = "密码", forceReq = true, required = true)
    @NotEmpty(message = "密码不能为空")
    private String password;
    @ApiModelProperty(value = "登录的类型", forceReq = true)
    private String deviceType;
    @ApiModelProperty(value = "作用域", forceReq = true)
    private String scope;
}
